BonitoBook

BonitoBook is a Julia-native interactive notebook system built on Bonito.jl that combines multi-language execution, AI integration, and modern web-based editing.

Getting started

This will start a server which adds the notebook to the server "/:notebook-name" route and opens a browser with the url. For using the Display system, e.g. in another notebook or VSCode plotpane, one can directly display the notebook:

Both run in the same Julia process as the parent, and therefore can also edit and re-eval any file there.

Runs everywhere

Thanks to Bonito.jl, which was build to run anywhere, BonitoBook has a wide range of ways to display it:

  • VSCode Plot Pane

  • Browser

  • Server deployments

  • HTML displays (Documenter, Pluto)

  • Electron applications

  • JuliaHub

  • Google Colab

Best Makie integration

Sadly, it has been hard to fully support all features of WGLMakie in Pluto or Jupyter. With BonitoBook, this is changing. As the name suggest, it's based on Bonito.jl, which is also the framework used to implement WGLMakie. With this, all features like offline export, interactivity, observables and widgets are supported.

🌌 3D Galaxy Explorer

Julia native

All components written in Julia

BonitoBook is built entirely in Julia using Bonito.jl, providing native performance and seamless integration with the Julia ecosystem.

Supports Julia commands

Ecosystem of Components vs Notebook

Easy to create new components in Julia

All components work standalone and can be reused

Simple to create new book types with different layouts

Full composability with existing Bonito apps

Any package defining Bonito Apps are working inside BonitoBook. This includes custom widgets, or whole applications.

BonitoBook.Components

BonitoBook comes with it's own Components, which are basically just the default Bonito components, but with a default style that works better with the book.

Button

Slider

Range: 1-100, Value: 50

Checkbox

Enabled

Dropdown

Number Input

@manipulate

BonitoBook brings back the beloved @manipulate macro from Interact.jl in a modern way. It works pretty much the same way, albeit may have missing features or differences in detail. You can also manually create it with ManipulateWidgets(Pair{Symbol, Any}[...], callback).

cmap
func
Typ
size
show_legend

LaTeX support

Great LaTeX support via MathTex.

$$$\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}$$ $$\mathbf{A} = \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}$$$

Python integration

Python support comes via PythonCall and CondaPkg, allowing to manage dependencies just like in Julia. Also, the cells share the same process and variables, allowing for seamless interaction.

Package management

Shared namespace

With the shared namespace, it becomes trivial to e.g. use WGLMakie for plotting python results.

Python: None

Rich MIME support

PythonCall has implemented some basic MIME support. Because Bonito supports MIME's in it's rendering as well, this means e.g. matplotlib output works without any addentional work, making it possible ot use e.g. matplotlib directly to visualize Julia results. This is true for most other Julia plotting libraries.

@edit support

Revise.jl integration

Changes from e.g. @bedit are automatically applied.

Style customization

Edit styles/style.jl by pressing the paintcan icon to customize appearance:

Export/import options

Import formats

  • Jupyter notebooks (.ipynb)

  • Markdown files (.md)

Export formats

  • export to standalone HTML file

  • Markdown export

  • Quarto export

  • IPynb

  • PDF

Folder structure

Each book creates a structured project with a hidden folder structure:

For Markdown files ( .md)

                                      mybook.md                # Main content file
.mybook-bbook/          # Hidden folder structure
├── styles/
│   └── style.jl        # Custom styling
├── ai/
│   ├── config.toml     # AI configuration
│   └── system-prompt.md # Custom AI prompt
└── .versions/          # Automatic backups
    └── mybook-*.md     # Timestamped backups
                                    

For imported formats (e.g. .ipynb)

                                      notebook.ipynb          # Original notebook file, not getting touched
.notebook-bbook/        # Hidden folder structure
├── notebook.md         # Converted markdown content (used for editing)
├── styles/
│   └── style.jl        # Custom styling
├── ai/
│   ├── config.toml     # AI configuration
│   └── system-prompt.md # Custom AI prompt
└── .versions/          # Automatic backups
    └── notebook-*.md   # Timestamped backups
                                    

Project structure

Each book folder can contain additional files and multiple notebooks sharing the same environment:

                                      myproject/
├── Project.toml         # Julia dependencies
├── Manifest.toml        # Dependency lock file
├── mybook.md           # Book content
├── .mybook-bbook/      # Hidden book structure
├── data/              # Data files
└── notebooks/         # Additional notebooks
                                    

This enables you to have a Julia project, with a few notebooks that can be run alongside your work, e.g. in the VSCode plotpane. When zipping everything into a reproducable, shareable archive, the project of the process that was used to start the notebook gets added to the zip, which should be the Project.toml and Manifest.toml of the package folder.

Key features:

  • Hidden folders: Book metadata is stored in hidden .book-name-bbook folders

  • Smart file handling: .md files edit in place, .ipynb files convert to .md for editing

  • Automatic versioning: Every save creates a timestamped backup

  • Reproducibility: With Project.toml and Manifest, each notebook is fully reproducible

  • Portability: The entire folder can be zipped and shared with all data, settings, and styling

Advanced features

Collapsible sidebars for tools, file browser, chat, and custom widgets. Configurable positioning and behavior.